<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <!-- <script>
    let obj = {
      name: '张三',
      age: 20,
      sex: '男',
      address: '中国人',
      sing: function () {
        console.log('我会唱歌')
      }
      sum: function (x, y) {
       return x + y
      }
    }

    console.log(obj.sing)
    console.log(obj.sum) -->

    <script>
      let obj = {
        name: "张三",
        age: 20,
        sex: "男",
        address: "中国人",
        sing: function () {
          let singing = "我会唱歌"
          //  console.log("我会唱歌")
          return singing
        },
        sum: function (x, y) {
          return x + y
        },
      }

      console.log(obj.sing())
      console.log(obj.sum(1, 2))
    </script>
  </body>
</html>
